package com.internetCafes.spms.web.tenant.vo;

import com.internetCafes.spms.web.tenant.model.TenantDeptInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class TenantDeptInfoVo extends TenantDeptInfo {

    /**
     * 租户名称
     */
    private String tenantName;

    /**
     * 父类名称
     */
    private String parentName;

    /**
     *
     */
    private boolean disabled = false;

    private Long certificateCount;

    private Long employeeCount;

    private Long employeeWithCerti;

    private String keepRate;

    private String nameOrPost;

    /**
     * 查看权限
     */
    private boolean authority;

    /**
     * 部门人员数量
     */
    private Integer memberAmount = 0;

    /**
     * 子类集合
     */
    private List<TenantDeptInfoVo> children = new ArrayList<>();

    /**
     * 部门管理层人员列表
     */
    private List<ManagerMember> managerMemberList;

    @Data
    public class ManagerMember {

        /**
         * id
         */
        private Long id;

        /**
         * 管理员姓名
         */
        private String name;
    }

    public Long getCertificateCount() {
        return certificateCount;
    }

    public void setCertificateCount(Long certificateCount) {
        this.certificateCount = certificateCount;
    }

    public TenantDeptInfoVo(){}

    public TenantDeptInfoVo(Long id, String deptName, Long parentId, String parentName) {
        super(id, deptName, parentId);
        this.parentName = parentName;
    }



    public String getTenantName() {
        return tenantName;
    }

    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<TenantDeptInfoVo> getChildren() {
        return children;
    }

    public void setChildren(List<TenantDeptInfoVo> children) {
        this.children = children;
    }

    public String getLabel(){
        return super.getDeptName();
    }

    public boolean isDisabled() {
        return disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
}
